package com.huaxiafinance.management.exception;

import com.huaxiafinance.management.util.ServiceCode;

/**
 * Created by lenovo on 2017/4/18.
 */
public class BusinessException extends Exception {
    private String code;
    private String message;

    public BusinessException() {
        code = ServiceCode.EXCEPTION_ERROR.getCode();
        message = ServiceCode.EXCEPTION_ERROR.getText();
    }

    public BusinessException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public BusinessException(String message) {
        this.code = ServiceCode.NORMAL_BUSINESS_EXCEPTION.getCode();
        this.message = message;
    }

    public BusinessException(String message, Throwable throwable) {
        super(message, throwable);
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
